package org.lemon.rabbitmqconsumer.rabbitmq;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Classname SecondDirectReceiver
 * @Description queues = "TestDirectQueue",监听的队列名称 TestDirectQueue
 * @Date 2023/7/7 14:35
 * @Author by PC
 */
@Component
@RabbitListener(queues = "TestDirectQueue")
public class SecondDirectReceiver {

    @RabbitHandler
    public void process(Map testMessage) {
        System.out.println("第二个DirectReceiver消费者收到消息  : " + testMessage.toString());
    }

}